Skip to content

Core: Check only snapshots an attempt added when detecting a landed commit - #4447

Open
Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/4022-landed-check-without-snapshot
Open

Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/4022-landed-check-without-snapshot

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown
Contributor

Rationale for this change

A transaction can register a producer that stages no snapshot, for example the delete half of an overwrite on an empty table. _attempt_landed() required a snapshot for every producer, so a commit that landed and was reported as failed was never detected. The retry then raised a validation error and deleted the manifest list and manifests of the snapshot that had already landed, leaving the table unreadable.

Check the snapshot ids in the transaction's AddSnapshotUpdates instead. Those are the snapshots the attempt actually tried to add.

Are these changes tested?

Yes. Two cases in tests/table/test_commit_retry.py simulate a lost response for an overwrite on an empty table, with the default retry budget and with zero retries. Both fail before the change and pass after it. tests/table passes.

Are there any user-facing changes?

No.

…ommit

A transaction can register a producer that stages no snapshot, such as a
delete that matches no files during an overwrite. The landed-attempt check
required a snapshot for every producer, so it never detected a commit that
landed and was reported as failed. The retry then raised a validation error
and deleted the manifests of the snapshot that had already landed.

Check the snapshots the attempt actually added instead.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant